{extend name="layout"}
{block name="style"}
<style>
.teacher {display: none}
.layui-btn-primary:hover{border-color: #e6e6e6;}
</style>
{/block}
{block name="header"}
{/block}
{block name="main"}
<div style="background-image:url(/layui/images/bg.png);background-size:cover;min-height:580px;">
  <div class="container " >
    <div style="width:360px;background-color:rgba(255,255,255,.95);float:right;border:1px solid #ddd;border-top:0;">
        
      <form class="layui-form" method="post" action="" style="padding:40px;">
        <h1 style="font-size:18px;font-weight:600;margin-bottom:30px;">管理员登录</h1>
        <div class="layui-form-item">
          <input type="username" name="username" lay-verify="required" autocomplete="off" placeholder="账号" class="layui-input">
        </div>
        <div class="layui-form-item">
          <input type="password" name="password" lay-verify="required" autocomplete="off" placeholder="密码" class="layui-input">
        </div>
        <div class="layui-form-item" style="margin-top:30px;">
          <button class="layui-btn layui-btn-primary" lay-submit lay-filter="*">立即登录</button>
          <a href="#" style="float:right;line-height:38px;padding:0 9px;">忘记密码</a>
        </div>
      </form>
        
    </div>
  </div>
</div>
{/block}
{block name="script"}
<script>
layui.use(['form','jquery','layer'], function(){
  var form = layui.form;
  var layer = layui.layer;
  var $ = layui.jquery;
  form.on('submit(*)', function(data){
    $.post('',data.field,function(res){
      if(res.code==1){
        location.href = res.url;
      }else{
        layer.msg(res.msg,{icon: 5,anim:6});
      }
    })
    return false;
  });
});
</script>
{/block}
